home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MATHS / PLPLOT / PLPLOT.ZIP / examples / C / x10c.c < prev    next >
C/C++ Source or Header  |  1994-06-30  |  2KB  |  53 lines

  1. /* $Id: x10c.c,v 1.6 1994/06/30 17:57:43 mjl Exp $
  2.  * $Log: x10c.c,v $
  3.  * Revision 1.6  1994/06/30  17:57:43  mjl
  4.  * All C example programs: made another pass to eliminate warnings when using
  5.  * gcc -Wall.  Lots of cleaning up: got rid of includes of math.h or string.h
  6.  * (now included by plplot.h), eliminated redundant casts, put in more
  7.  * uniform comments, and other minor changes.
  8.  *
  9.  * Revision 1.5  1994/03/30  07:21:54  mjl
  10.  * Changes to all C example programs: special handling for malloc re: header
  11.  * files eliminated, include of stdio.h and stdlib.h eliminated (now done
  12.  * by plplot.h), include of "plplot.h" changed to <plplot.h> to enable
  13.  * simpler builds by the general user, some cleaning up also.
  14. */
  15.  
  16. /*    x10c.c
  17.  
  18.     Window positioning demo.
  19. */
  20.  
  21. #include <plplot.h>
  22.  
  23. /*----------------------------------------------------------------------*\
  24.  * main
  25.  *
  26.  * Demonstrates absolute positioning of graphs on a page.
  27. \*----------------------------------------------------------------------*/
  28.  
  29. int
  30. main(int argc, char *argv[])
  31. {
  32.  
  33. /* Parse and process command line arguments */
  34.  
  35.     (void) plParseInternalOpts(&argc, argv, PL_PARSE_FULL);
  36.  
  37. /* Initialize plplot */
  38.  
  39.     plinit();
  40.  
  41.     pladv(0);
  42.     plvpor(0.0, 1.0, 0.0, 1.0);
  43.     plwind(0.0, 1.0, 0.0, 1.0);
  44.     plbox("bc", 0.0, 0, "bc", 0.0, 0);
  45.  
  46.     plsvpa(50.0, 150.0, 100.0, 150.0);
  47.     plwind(0.0, 1.0, 0.0, 1.0);
  48.     plbox("bc", 0.0, 0, "bc", 0.0, 0);
  49.     plptex(0.5, 0.5, 1.0, 0.0, 0.5, "BOX at (50,150,100,150)");
  50.     plend();
  51.     exit(0);
  52. }
  53.